import request from "@/utils/request";

/**
 * 属性分组
 */
export default {

  //获取全部属性分组
  getAllAttrGroup() {
    return request({
      url: '/gmmallproduct/attrgroup/all',
      method: 'get',
    })
  },

  //分页获取属性分组
  getAttrGroupInfo(params) {
    return request({
      url: '/gmmallproduct/attrgroup/list',
      method: 'get',
      params: params
    })
  },

  //添加属性分组
  addAttrGroupInfo(attrGroup) {
    return request({
      url: '/gmmallproduct/attrgroup/save',
      method: 'post',
      data: attrGroup
    })
  },

  //根据id获取属性分组信息
  getAttrGroupInfoByAttrGroupId(id) {
    return request({
      url: '/gmmallproduct/attrgroup/info/' + id,
      method: 'get',
    })
  },

  //修改属性分组
  updateAttrGroupInfo(attrGroup) {
    return request({
      url: '/gmmallproduct/attrgroup/update',
      method: 'put',
      data: attrGroup
    })
  },

  deleteAttrGroupInfo(id) {
    return request({
      url: '/gmmallproduct/attrgroup/delete/' + id,
      method: 'delete',
    })
  }

}
